Skip to content

[#10862] improvement(ci): Pre-install JDK 24 to stabilize Trino connector build#10863

Open
diqiu50 wants to merge 4 commits intoapache:mainfrom
diqiu50:fix/ci-trino-jdk24
Open

[#10862] improvement(ci): Pre-install JDK 24 to stabilize Trino connector build#10863
diqiu50 wants to merge 4 commits intoapache:mainfrom
diqiu50:fix/ci-trino-jdk24

Conversation

@diqiu50
Copy link
Copy Markdown
Contributor

@diqiu50 diqiu50 commented Apr 24, 2026

What changes were proposed in this pull request?

  • Add reusable composite action .github/actions/setup-java-toolchains that pre-installs JDK 24 alongside JDK 17 and registers JDK 24 with Gradle toolchain via ~/.gradle/gradle.properties, eliminating unreliable Foojay downloads at build time.
  • Apply the composite action to 5 workflows that build Trino connector modules: build.yml, trino-integration-test.yml, trino-multi-version-test.yml, frontend-integration-test.yml, cron-integration-test.yml.
  • Add skipTrinoConnector property to settings.gradle.kts to conditionally exclude all Trino subprojects from the Gradle project graph. Use it in gvfs-fuse-build-test.yml which has no Trino dependency.

Why are the changes needed?

Fix: #10862

Trino connector submodules require Java 24 via Gradle toolchain. When only JDK 17 is installed in CI, Gradle auto-downloads JDK 24 via the Foojay resolver plugin, which is unreliable and causes flaky CI failures.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI workflows validation.

…or build in CI

Create a reusable composite action that installs JDK 24 alongside JDK 17
and registers JDK 24 with Gradle toolchain via gradle.properties, eliminating
unreliable Foojay downloads. Add skipTrinoConnector property to exclude Trino
subprojects from the build in workflows that do not need them.
Copilot AI review requested due to automatic review settings April 24, 2026 08:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to stabilize CI builds for Trino connector modules by pre-installing JDK 24 (avoiding flaky Foojay toolchain downloads) and adding a Gradle flag to optionally exclude all Trino connector subprojects when they aren’t needed.

Changes:

  • Added a reusable composite GitHub Action to install JDK 24 + primary JDK and register JDK 24 with Gradle toolchains.
  • Updated multiple CI workflows that build/test Trino connectors to use the composite action instead of inline actions/setup-java.
  • Added -PskipTrinoConnector support in settings.gradle.kts and used it in the gvfs-fuse workflow to skip Trino modules.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
settings.gradle.kts Adds skipTrinoConnector property gate to exclude Trino subprojects from the Gradle project graph.
.github/actions/setup-java-toolchains/action.yml New composite action to install JDK 24 + primary JDK and register JDK 24 path for Gradle toolchains.
.github/workflows/build.yml Switches relevant jobs to use the new composite Java toolchain setup.
.github/workflows/trino-integration-test.yml Uses composite action to ensure JDK 24 is present for Trino integration tests.
.github/workflows/trino-multi-version-test.yml Uses composite action so multi-version Trino tests don’t rely on Foojay downloads.
.github/workflows/frontend-integration-test.yml Uses composite action to stabilize the Trino connector build step (compileTrinoConnector).
.github/workflows/cron-integration-test.yml Uses composite action so scheduled integration tests don’t rely on runtime JDK downloads.
.github/workflows/gvfs-fuse-build-test.yml Adds -PskipTrinoConnector=true to one Gradle invocation to avoid including Trino modules.

Comment thread .github/workflows/gvfs-fuse-build-test.yml Outdated
Comment thread .github/actions/setup-java-toolchains/action.yml Outdated
Comment thread settings.gradle.kts Outdated
"trino-connector:trino-connector-473-478",
"trino-connector:integration-test"
)
if (gradle.startParameter.projectProperties["skipTrinoConnector"]?.toBoolean() != true) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the default value of it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to set this to true in the backend CI pipeline?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

Code Coverage Report

Overall Project 65.35% 🟢
Files changed No Java source files changed -

Module Coverage
aliyun 1.73% 🔴
api 47.13% 🟢
authorization-common 85.96% 🟢
aws 1.1% 🔴
azure 2.6% 🔴
catalog-common 10.2% 🔴
catalog-fileset 80.02% 🟢
catalog-glue 91.48% 🟢
catalog-hive 81.83% 🟢
catalog-jdbc-clickhouse 79.06% 🟢
catalog-jdbc-common 43.93% 🟢
catalog-jdbc-doris 80.28% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.23% 🟢
catalog-jdbc-oceanbase 78.38% 🟢
catalog-jdbc-postgresql 82.05% 🟢
catalog-jdbc-starrocks 78.27% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 45.07% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 86.98% 🟢
catalog-lakehouse-paimon 77.71% 🟢
catalog-model 77.72% 🟢
cli 44.51% 🟢
client-java 77.63% 🟢
common 48.67% 🟢
core 81.54% 🟢
filesystem-hadoop3 76.97% 🟢
flink 40.55% 🟢
flink-runtime 0.0% 🔴
gcp 14.2% 🔴
hadoop-common 10.39% 🔴
hive-metastore-common 46.83% 🟢
iceberg-common 55.2% 🟢
iceberg-rest-server 67.17% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 23.88% 🔴
lance-rest-server 57.84% 🟢
lineage 53.02% 🟢
optimizer 82.95% 🟢
optimizer-api 21.95% 🔴
server 85.6% 🟢
server-common 69.76% 🟢
spark 32.79% 🔴
spark-common 39.09% 🔴
trino-connector 34.27% 🔴

printf ' %q' "${gradle_args[@]}"
printf '\n'

./gradlew "${gradle_args[@]}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to add -PskipTrinoConnector=true here?

Comment thread settings.gradle.kts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] Fix unstable JDK 24 download in CI for Trino connector build

3 participants